local skel = fk.CreateSkill{
  name = "lb__jiming",
  tags = {Skill.Limited}
}

Fk:loadTranslationTable{
  ["lb__jiming"] = "冀明",
  [":lb__jiming"] = "<b>限定技</b>，出牌阶段，你可以重铸一张牌并令所有其他角色也如此做，然后你使用因此重铸的一张牌。",

  ["#lb__jiming"] = "冀明：你可以重铸一张牌并令所有其他角色也如此做，然后你使用因此重铸的一张牌",
  ["#lb__jiming_ask"] = "冀明：请重铸一张牌",
  ["#lb__jiming_use"] = "冀明：请使用一张牌",

  ["$lb__jiming1"] = "克拉拉要勇敢一点",
  ["$lb__jiming2"] = "我也想保护大家！",
}

skel:addEffect("active", {
  prompt = "#lb__jiming",
  can_use = function (self, player)
    return player:usedSkillTimes(skel.name, Player.HistoryGame) < 1
  end,
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0
  end,
  target_filter = Util.FalseFunc,
  feasible = function (self, player, selected, selected_cards, card)
    return #selected_cards == 1
  end,
  on_use = function (self, room, effect)
    local player = effect.from
    local cards = table.simpleClone(effect.cards)
    room:recastCard(cards, player, skel.name)
    for _, to in ipairs(room:getOtherPlayers(player)) do
      if not to:isNude() then
        local ids = room:askToCards(to, {
          min_num = 1,
          max_num = 1,
          skill_name = skel.name,
          include_equip = true,
          cancelable = false,
          prompt = "#lb__jiming_ask",
        })
        table.insertTableIfNeed(cards, ids)
        room:recastCard(ids, to, skel.name)
      end
    end
    room:askToUseRealCard(player, {
      pattern = cards,
      skill_name = skel.name,
      extra_data = {expand_pile = cards},
      cancelable = false,
      prompt = "#lb__jiming_use",
    })
  end,
})

return skel